//
//  hotCommentView.m
//  音乐播放器
//
//  Created by apple on 16/7/25.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "HMXHotCommentView.h"

@interface HMXHotCommentView ()

@property (weak, nonatomic) IBOutlet UILabel *hotCommentL;

@property (weak, nonatomic) IBOutlet UIButton *hotCommentBtn;

@property (weak, nonatomic) IBOutlet UILabel *hotCommentNum;

@end

@implementation HMXHotCommentView

+(instancetype)viewFromXib{

    return [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(self) owner:nil options:nil].lastObject;
}

-(void)setItem:(musicModel *)item{
    
    _item = item;
    self.hotCommentL.text = _item.hotCommentlist;
    self.hotCommentNum.text = _item.hotCommentlistNum;
    
}

- (IBAction)hotCommentBtnClick:(UIButton *)sender {
    NSLog(@"%@",self.hotCommentL);
    NSNotification *noti = [NSNotification notificationWithName:@"commentNotification" object:self userInfo:@{@"BtnClick":sender,@"text":self.hotCommentNum}];
    
    //发送通知
    [[NSNotificationCenter defaultCenter]postNotification:noti];
}

@end
